package com.dcits.account.util;

import org.springframework.util.DigestUtils;

import java.nio.charset.StandardCharsets;

/**
 * @Auther: 2843896844@qq.com
 * @Date: 2021/06/12/10:09
 * @Description:
 */
public class DigestUtil {

    /**
     * md5非对称加密
     *
     * @param pwd
     * @return
     */
    public static String md5Digest(String pwd) {
        String digest = DigestUtils.md5DigestAsHex(pwd.getBytes(StandardCharsets.UTF_8));
        return digest;
    }
}
